Skip to main content

ARDK for Android/com.nianticlabs.ardk.scanning/ScanningSession/save

save

[androidJvm]
suspend fun save(timeoutMillis: Long = TIMEOUT_MS): AsyncResult<ScanSaveInfo, ScanSaveError>

Asynchronously saves the current scan and polls until the operation is complete.

This function initiates the save operation and then suspends until the save process finishes, either with a success, a failure, or a timeout.

Return​

An AsyncResult which will be either AsyncResult.Success containing the final ScanSaveInfo on success, AsyncResult.Error detailing the failure reason, or AsyncResult.Timeout indicating a timeout in the scanning process

Parameters​

androidJvm

timeoutMillisThe maximum time to wait for the save operation to complete.

Throws​

ArdkInvalidOperationStatusExceptionif there were no frames to save. Call getRecordingInfo to check there are frames before calling this function.